package jsyf.oa.entity.wreport;

import com.alibaba.fastjson.JSONObject;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Table;

import jsyf.oa.ientity.BaseEntity;

/**
 * @description:
 * @author: @张巨波 @zhangjubo
 * @creat: on 2017/11/24.
 * @since: V1.0.0
 * @see jsyf.oa.web
 */

@Entity
@Table(name = "T_WRT_CUSTOMER", schema = "oa", catalog = "")
public class WReportCustomerEntity extends BaseEntity implements Serializable {
    private String tel;
    private String name;
    private String birthday;
    private String customerType;
    private String customerLevel;
    private String customerCredit;
    private String serverCondition;
    private String companyName;
    private String buildProvinceName;
    private String buildCityName;
    private String buildCountyName;
    private String buildProvinceId;
    private String buildCityId;
    private String buildCountyId;
    private Date createTime;
    private String createUserId;
    private String intentionModel;
    private String intentionDevice;
    private String intentionBrand;
    private String accountCustomerType;
    private String deviceInfo;
    private String deviceHour;
    private String machineNo;
    private String provinceName;
    private String cityName;
    private String countyName;


    public String getProvinceName() {
        return provinceName;
    }

    public void setProvinceName(String provinceName) {
        this.provinceName = provinceName;
    }

    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    public String getCountyName() {
        return countyName;
    }

    public void setCountyName(String countyName) {
        this.countyName = countyName;
    }

    public String getAccountCustomerType() {
        return accountCustomerType;
    }

    public void setAccountCustomerType(String accountCustomerType) {
        this.accountCustomerType = accountCustomerType;
    }

    public String getDeviceInfo() {
        return deviceInfo;
    }

    public void setDeviceInfo(String deviceInfo) {
        this.deviceInfo = deviceInfo;
    }

    public String getDeviceHour() {
        return deviceHour;
    }

    public void setDeviceHour(String deviceHour) {
        this.deviceHour = deviceHour;
    }

    public String getMachineNo() {
        return machineNo;
    }

    public void setMachineNo(String machineNo) {
        this.machineNo = machineNo;
    }

    public String getCompetitorCondition() {
        return competitorCondition;
    }

    public void setCompetitorCondition(String competitorCondition) {
        this.competitorCondition = competitorCondition;
    }

    private String source;
    private String buyType;
    private String buyDate;
    private String fundCondition;
    private String otherCondition;
    private String existingDevice;
    private String competitorCondition;
    private int intentionFlag;
    private Date intentionTime;

    private String wechat;

    private String otherVisitType;
    private String serialNo;
    private String accessoriesChargesCondition;
    private String hoursChargesCondition;


    private String serverCustomerType;
    private String debtCondition;
    private String lettersCondition;
    private String idCard;
    private String customerAddress;




    /*
    服务台账
     */
    private String type;
    //服务记录
    private String repairOrderNumber;//保修单号
    private String fwWorkingCondition;//工况
    private String fwWorkingHoursAvg;//日均工作小时
    private String fwLatestWorkingHours;//最新工作小时
    private String principal;	//负责人
    private String fwState;//状态


    //索赔记录
    private String claimSubmissionDate; //索赔递交日
    private String claimType ; //索赔类型
    private String claimAmount;  //索赔金额
    private String replyDate ;  //批复日期
    private String approvalAmount ;//批复金额
    private String arrivalDate  ;//到账日期
    private String arrivalAmount ; //到账金额
    private String refusalAmount  ;//拒赔金额
    private String refusalReason ; //拒赔原因
    private String oldCondition ; //旧件情况
    private String returnDate;   //返厂日期
    private String returnWaybill ; //返厂运单
    //销售记录
    private String numberDelivery;	//出库单号
    private String outboundAmount ;  //出库金额
    private String paymentAmount  ;//回款金额
    private String amountOwed  ;  //欠款金额
    private String estimatedRepaymentDate  ;//预计还款日期
    private String actualRepaymentDate  ;//实际还款日期
    private String description  ;//说明

    private String chance;
    private String businessDate;


    public String getChance() {
        return chance;
    }

    public void setChance(String chance) {
        this.chance = chance;
    }

    public String getBusinessDate() {
        return businessDate;
    }

    public void setBusinessDate(String businessDate) {
        this.businessDate = businessDate;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getRepairOrderNumber() {
        return repairOrderNumber;
    }

    public void setRepairOrderNumber(String repairOrderNumber) {
        this.repairOrderNumber = repairOrderNumber;
    }

    public String getFwWorkingCondition() {
        return fwWorkingCondition;
    }

    public void setFwWorkingCondition(String fwWorkingCondition) {
        this.fwWorkingCondition = fwWorkingCondition;
    }

    public String getFwWorkingHoursAvg() {
        return fwWorkingHoursAvg;
    }

    public void setFwWorkingHoursAvg(String fwWorkingHoursAvg) {
        this.fwWorkingHoursAvg = fwWorkingHoursAvg;
    }

    public String getFwLatestWorkingHours() {
        return fwLatestWorkingHours;
    }

    public void setFwLatestWorkingHours(String fwLatestWorkingHours) {
        this.fwLatestWorkingHours = fwLatestWorkingHours;
    }

    public String getPrincipal() {
        return principal;
    }

    public void setPrincipal(String principal) {
        this.principal = principal;
    }

    public String getFwState() {
        return fwState;
    }

    public void setFwState(String fwState) {
        this.fwState = fwState;
    }

    public String getClaimSubmissionDate() {
        return claimSubmissionDate;
    }

    public void setClaimSubmissionDate(String claimSubmissionDate) {
        this.claimSubmissionDate = claimSubmissionDate;
    }

    public String getClaimType() {
        return claimType;
    }

    public void setClaimType(String claimType) {
        this.claimType = claimType;
    }

    public String getClaimAmount() {
        return claimAmount;
    }

    public void setClaimAmount(String claimAmount) {
        this.claimAmount = claimAmount;
    }

    public String getReplyDate() {
        return replyDate;
    }

    public void setReplyDate(String replyDate) {
        this.replyDate = replyDate;
    }

    public String getApprovalAmount() {
        return approvalAmount;
    }

    public void setApprovalAmount(String approvalAmount) {
        this.approvalAmount = approvalAmount;
    }

    public String getArrivalDate() {
        return arrivalDate;
    }

    public void setArrivalDate(String arrivalDate) {
        this.arrivalDate = arrivalDate;
    }

    public String getArrivalAmount() {
        return arrivalAmount;
    }

    public void setArrivalAmount(String arrivalAmount) {
        this.arrivalAmount = arrivalAmount;
    }

    public String getRefusalAmount() {
        return refusalAmount;
    }

    public void setRefusalAmount(String refusalAmount) {
        this.refusalAmount = refusalAmount;
    }

    public String getRefusalReason() {
        return refusalReason;
    }

    public void setRefusalReason(String refusalReason) {
        this.refusalReason = refusalReason;
    }

    public String getOldCondition() {
        return oldCondition;
    }

    public void setOldCondition(String oldCondition) {
        this.oldCondition = oldCondition;
    }

    public String getReturnDate() {
        return returnDate;
    }

    public void setReturnDate(String returnDate) {
        this.returnDate = returnDate;
    }

    public String getReturnWaybill() {
        return returnWaybill;
    }

    public void setReturnWaybill(String returnWaybill) {
        this.returnWaybill = returnWaybill;
    }

    public String getNumberDelivery() {
        return numberDelivery;
    }

    public void setNumberDelivery(String numberDelivery) {
        this.numberDelivery = numberDelivery;
    }

    public String getOutboundAmount() {
        return outboundAmount;
    }

    public void setOutboundAmount(String outboundAmount) {
        this.outboundAmount = outboundAmount;
    }

    public String getPaymentAmount() {
        return paymentAmount;
    }

    public void setPaymentAmount(String paymentAmount) {
        this.paymentAmount = paymentAmount;
    }

    public String getAmountOwed() {
        return amountOwed;
    }

    public void setAmountOwed(String amountOwed) {
        this.amountOwed = amountOwed;
    }

    public String getEstimatedRepaymentDate() {
        return estimatedRepaymentDate;
    }

    public void setEstimatedRepaymentDate(String estimatedRepaymentDate) {
        this.estimatedRepaymentDate = estimatedRepaymentDate;
    }

    public String getActualRepaymentDate() {
        return actualRepaymentDate;
    }

    public void setActualRepaymentDate(String actualRepaymentDate) {
        this.actualRepaymentDate = actualRepaymentDate;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getIdCard() {
        return idCard;
    }

    public void setIdCard(String idCard) {
        this.idCard = idCard;
    }

    public String getCustomerAddress() {
        return customerAddress;
    }

    public void setCustomerAddress(String customerAddress) {
        this.customerAddress = customerAddress;
    }

    public String getServerCustomerType() {
        return serverCustomerType;
    }

    public void setServerCustomerType(String serverCustomerType) {
        this.serverCustomerType = serverCustomerType;
    }

    public String getDebtCondition() {
        return debtCondition;
    }

    public void setDebtCondition(String debtCondition) {
        this.debtCondition = debtCondition;
    }

    public String getLettersCondition() {
        return lettersCondition;
    }

    public void setLettersCondition(String lettersCondition) {
        this.lettersCondition = lettersCondition;
    }

    public String getOtherVisitType() {
        return otherVisitType;
    }

    public void setOtherVisitType(String otherVisitType) {
        this.otherVisitType = otherVisitType;
    }

    public String getSerialNo() {
        return serialNo;
    }

    public void setSerialNo(String serialNo) {
        this.serialNo = serialNo;
    }

    public String getAccessoriesChargesCondition() {
        return accessoriesChargesCondition;
    }

    public void setAccessoriesChargesCondition(String accessoriesChargesCondition) {
        this.accessoriesChargesCondition = accessoriesChargesCondition;
    }

    public String getHoursChargesCondition() {
        return hoursChargesCondition;
    }

    public void setHoursChargesCondition(String hoursChargesCondition) {
        this.hoursChargesCondition = hoursChargesCondition;
    }

    public int getIntentionFlag() {
        return intentionFlag;
    }

    public void setIntentionFlag(int intentionFlag) {
        this.intentionFlag = intentionFlag;
    }

    public Date getIntentionTime() {
        return intentionTime;
    }

    public void setIntentionTime(Date intentionTime) {
        this.intentionTime = intentionTime;
    }

    public String getCustomerType() {
        return customerType;
    }

    public void setCustomerType(String customerType) {
        this.customerType = customerType;
    }

    public String getCustomerLevel() {
        return customerLevel;
    }

    public void setCustomerLevel(String customerLevel) {
        this.customerLevel = customerLevel;
    }

    public String getCustomerCredit() {
        return customerCredit;
    }

    public void setCustomerCredit(String customerCredit) {
        this.customerCredit = customerCredit;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public String getIntentionDevice() {
        return intentionDevice;
    }

    public void setIntentionDevice(String intentionDevice) {
        this.intentionDevice = intentionDevice;
    }

    public String getIntentionBrand() {
        return intentionBrand;
    }

    public void setIntentionBrand(String intentionBrand) {
        this.intentionBrand = intentionBrand;
    }

    public String getExistingDevice() {
        return existingDevice;
    }

    public void setExistingDevice(String existingDevice) {
        this.existingDevice = existingDevice;
    }

    public String getBirthday() {
        return birthday;
    }

    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTel() {
        return tel;
    }

    public void setTel(String tel) {
        this.tel = tel;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getBuildProvinceName() {
        return buildProvinceName;
    }

    public void setBuildProvinceName(String buildProvinceName) {
        this.buildProvinceName = buildProvinceName;
    }

    public String getBuildCityName() {
        return buildCityName;
    }

    public void setBuildCityName(String buildCityName) {
        this.buildCityName = buildCityName;
    }

    public String getBuildCountyName() {
        return buildCountyName;
    }

    public void setBuildCountyName(String buildCountyName) {
        this.buildCountyName = buildCountyName;
    }

    public String getBuildProvinceId() {
        return buildProvinceId;
    }

    public void setBuildProvinceId(String buildProvinceId) {
        this.buildProvinceId = buildProvinceId;
    }

    public String getBuildCityId() {
        return buildCityId;
    }

    public void setBuildCityId(String buildCityId) {
        this.buildCityId = buildCityId;
    }

    public String getBuildCountyId() {
        return buildCountyId;
    }

    public void setBuildCountyId(String buildCountyId) {
        this.buildCountyId = buildCountyId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(String createUserId) {
        this.createUserId = createUserId;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public String getIntentionModel() {
        return intentionModel;
    }

    public void setIntentionModel(String intentionModel) {
        this.intentionModel = intentionModel;
    }

    public String getBuyType() {
        return buyType;
    }

    public void setBuyType(String buyType) {
        this.buyType = buyType;
    }

    public String getBuyDate() {
        return buyDate;
    }

    public void setBuyDate(String buyDate) {
        this.buyDate = buyDate;
    }

    public String getFundCondition() {
        return fundCondition;
    }

    public void setFundCondition(String fundCondition) {
        this.fundCondition = fundCondition;
    }


    public String getOtherCondition() {
        return otherCondition;
    }

    public void setOtherCondition(String otherCondition) {
        this.otherCondition = otherCondition;
    }

    public String getWechat() {
        return wechat;
    }

    public void setWechat(String wechat) {
        this.wechat = wechat;
    }

    public String getServerCondition() {
        return serverCondition;
    }

    public void setServerCondition(String serverCondition) {
        this.serverCondition = serverCondition;
    }

    @Override
    public String getViewName() {
        return super.getViewName();
    }

    @Override
    public String getTableName() {
        return "T_WRT_CUSTOMER";
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject obj = new JSONObject();
        obj.put("ID", "id");
        obj.put("TEL", "tel");
        obj.put("NAME", "name");
        obj.put("BUILD_PROVINCE_NAME", "buildProvinceName");
        obj.put("BUILD_CITY_NAME", "buildCityName");
        obj.put("BUILD_COUNTY_NAME", "buildCountyName");
        obj.put("BUILD_PROVINCE_ID", "buildProvinceId");
        obj.put("BUILD_CITY_ID", "buildCityId");
        obj.put("BUILD_COUNTY_ID", "buildCountyId");
        obj.put("CREATE_TIME", "createTime");
        obj.put("CREATE_USER_ID", "createUserId");
        obj.put("SOURCE", "source");
        obj.put("INTENTION_MODEL", "intentionModel");
        obj.put("INTENTION_DEVICE", "intentionDevice");
        obj.put("INTENTION_BRAND", "intentionBrand");
        obj.put("BUY_TYPE", "buyType");
        obj.put("BUY_DATE", "buyDate");
        obj.put("FUND_CONDITION", "fundCondition");
        obj.put("OTHER_CONDITION", "otherCondition");
        obj.put("EXISTING_DEVICE", "existingDevice");
        obj.put("WECHAT", "wechat");
        obj.put("BIRTHDAY", "birthday");
        obj.put("COMPANY_NAME", "companyName");
        obj.put("CUSTOMER_TYPE", "customerType");
        obj.put("CUSTOMER_LEVEL", "customerLevel");
        obj.put("CUSTOMER_CREDIT", "customerCredit");
        obj.put("SERVER_CONDITION", "serverCondition");
        obj.put("COMPETITOR_CONDITION", "competitorCondition");
        obj.put("INTENTION_FLAG", "intentionFlag");
        obj.put("INTENTION_TIME", "intentionTime");

        obj.put("OTHER_VISIT_TYPE", "otherVisitType");
        obj.put("SERIALNO", "serialNo");
        obj.put("ACCESSORIES_CHARGES_CONDITION", "accessoriesChargesCondition");
        obj.put("HOURS_CHARGES_CONDITION", "hoursChargesCondition");

        obj.put("SERVER_CUSTOMER_TYPE", "serverCustomerType");
        obj.put("DEBT_CONDITION", "debtCondition");
        obj.put("LETTERS_CONDITION", "lettersCondition");
        obj.put("CUSTOMER_ADDRESS", "customerAddress");
        obj.put("ID_CARD", "idCard");
        obj.put("DEVICEINFO", "deviceInfo");
        obj.put("DEVICEHOUR", "deviceHour");
        obj.put("MACHINENO", "machineNo");


        obj.put("TYPE", "type");
        obj.put("REPAIR_ORDER_NUMBER", "repairOrderNumber");
        obj.put("FW_WORKING_CONDITION", "fwWorkingCondition");
        obj.put("FW_WORKING_HOURS_AVG", "fwWorkingHoursAvg");
        obj.put("FW_LATEST_WORKING_HOURS", "fwLatestWorkingHours");
        obj.put("PRINCIPAL","principal");
        obj.put("FW_STATE", "fwState");
        obj.put("CLAIM_SUBMISSION_DATE","claimSubmissionDate");
        obj.put("CLAIM_TYPE", "claimType");
        obj.put("CLAIM_AMOUNT","claimAmount");
        obj.put("REPLY_DATE", "replyDate");
        obj.put("APPROVAL_AMOUNT", "approvalAmount");
        obj.put("ARRIVAL_DATE", "arrivalDate");
        obj.put("ARRIVAL_AMOUNT","arrivalAmount");
        obj.put("REFUSAL_AMOUNT","refusalAmount");
        obj.put("REFUSAL_REASON","refusalReason");
        obj.put("OLD_CONDITION","oldCondition");
        obj.put("RETURN_DATE","returnDate");
        obj.put("RETURN_WAYBILL","returnWaybill");
        obj.put("NUMBER_DELIVERY","numberDelivery");
        obj.put("OUTBOUND_AMOUNT","outboundAmount");
        obj.put("PAYMENT_AMOUNT", "paymentAmount");
        obj.put("AMOUNT_OWED","amountOwed");
        obj.put("ESTIMATED_REPAYMENT_DATE","estimatedRepaymentDate");
        obj.put("ACTUAL_REPAYMENT_DATE","actualRepaymentDate");
        obj.put("DESCRIPTION","description");
        obj.put("ACCOUNT_CUSTOMER_TYPE","accountCustomerType");

        obj.put("CHANCE","chance");
        obj.put("BUSINESS_DATE","businessDate");

        obj.put("PROVINCE_NAME", "provinceName");
        obj.put("CITY_NAME", "cityName");
        obj.put("COUNTY_NAME", "countyName");
        return obj;
    }

    @Override
    public JSONObject getJSONObject() {
        JSONObject obj = new JSONObject();

        obj.put("ID", getId());
        obj.put("TEL", getTel());
        obj.put("NAME", getName());
        obj.put("BUILD_PROVINCE_NAME", getBuildCountyName());
        obj.put("BUILD_CITY_NAME", getBuildCityName());
        obj.put("BUILD_COUNTY_NAME", getBuildCountyName());
        obj.put("BUILD_PROVINCE_ID", getBuildProvinceId());
        obj.put("BUILD_CITY_ID", getBuildCityId());
        obj.put("BUILD_COUNTY_ID", getBuildCountyId());
        obj.put("CREATE_TIME", getCreateTime());
        obj.put("CREATE_USER_ID", getCreateUserId());
        obj.put("SOURCE", getSource());
        obj.put("INTENTION_MODEL", getIntentionModel());
        obj.put("INTENTION_DEVICE", getIntentionDevice());
        obj.put("INTENTION_BRAND", getIntentionBrand());
        obj.put("BUY_TYPE", getBuyType());
        obj.put("BUY_DATE", getBuyDate());
        obj.put("FUND_CONDITION", getFundCondition());
        obj.put("OTHER_CONDITION", getOtherCondition());
        obj.put("EXISTING_DEVICE", getExistingDevice());
        obj.put("WECHAT", getWechat());
        obj.put("BIRTHDAY", getBirthday());
        obj.put("COMPANY_NAME", getCompanyName());
        obj.put("COMPETITOR_CONDITION", getCompetitorCondition());
        obj.put("CUSTOMER_TYPE", getCustomerType());
        obj.put("CUSTOMER_LEVEL", getCustomerLevel());
        obj.put("CUSTOMER_CREDIT", getCustomerCredit());
        obj.put("INTENTION_FLAG", getIntentionFlag());
        obj.put("INTENTION_TIME", getIntentionTime());
        obj.put("SERVER_CONDITION", getServerCondition());
        obj.put("OTHER_VISIT_TYPE", getOtherVisitType());
        obj.put("SERIALNO", getSerialNo());
        obj.put("ACCESSORIES_CHARGES_CONDITION", getAccessoriesChargesCondition());
        obj.put("HOURS_CHARGES_CONDITION", getHoursChargesCondition());
        obj.put("SERVER_CUSTOMER_TYPE", getServerCustomerType());
        obj.put("DEBT_CONDITION", getDebtCondition());
        obj.put("LETTERS_CONDITION", getLettersCondition());
        obj.put("CUSTOMER_ADDRESS", getCustomerAddress());
        obj.put("ID_CARD", getIdCard());

        obj.put("DEVICEINFO", getDeviceInfo());
        obj.put("DEVICEHOUR", getDeviceHour());
        obj.put("MACHINENO", getMachineNo());


        obj.put("TYPE", getType());
        obj.put("REPAIR_ORDER_NUMBER", getRepairOrderNumber());
        obj.put("FW_WORKING_CONDITION", getFwWorkingCondition());
        obj.put("FW_WORKING_HOURS_AVG", getFwWorkingHoursAvg());
        obj.put("FW_LATEST_WORKING_HOURS", getFwLatestWorkingHours());
        obj.put("PRINCIPAL", getPrincipal());
        obj.put("FW_STATE", getFwState());
        obj.put("CLAIM_SUBMISSION_DATE", getClaimSubmissionDate());
        obj.put("CLAIM_TYPE", getClaimType());
        obj.put("CLAIM_AMOUNT", getClaimAmount());
        obj.put("REPLY_DATE", getReplyDate());
        obj.put("APPROVAL_AMOUNT", getApprovalAmount());
        obj.put("ARRIVAL_DATE", getArrivalDate());
        obj.put("ARRIVAL_AMOUNT", getArrivalAmount());
        obj.put("REFUSAL_AMOUNT", getRefusalAmount());
        obj.put("REFUSAL_REASON", getRefusalReason());
        obj.put("OLD_CONDITION", getOldCondition());
        obj.put("RETURN_DATE", getReturnDate());
        obj.put("RETURN_WAYBILL", getReturnWaybill());
        obj.put("NUMBER_DELIVERY", getNumberDelivery());
        obj.put("OUTBOUND_AMOUNT", getOutboundAmount());
        obj.put("PAYMENT_AMOUNT", getPaymentAmount());
        obj.put("AMOUNT_OWED", getAmountOwed());
        obj.put("ESTIMATED_REPAYMENT_DATE", getEstimatedRepaymentDate());
        obj.put("ACTUAL_REPAYMENT_DATE", getActualRepaymentDate());
        obj.put("DESCRIPTION", getDescription());
        obj.put("ACCOUNT_CUSTOMER_TYPE", getAccountCustomerType());
        obj.put("CHANCE",getChance());
        obj.put("BUSINESS_DATE",getBusinessDate());
        obj.put("PROVINCE_NAME", getProvinceName());
        obj.put("CITY_NAME", getCityName());
        obj.put("COUNTY_NAME", getCountyName());
        return obj;
    }

    /*public JSONObject getJSONObjectId() {
        JSONObject obj = new JSONObject();
        obj.put("id", getId());
        return obj;
    }*/

}
